home *** CD-ROM | disk | FTP | other *** search
- function scrollbar_init(tgt)
- {
- var content = eval(tgt);
- if(content._height < 600)
- {
- pcnt = 100 / content._height * scrollbar.bg._height;
- }
- else
- {
- pcnt = 100 / (content._height * 1.1) * scrollbar.bg._height;
- }
- if(pcnt <= 100)
- {
- scrollbar.slider._height = scrollbar.bg._height / 100 * pcnt;
- scrollbar.slider.onPress = function()
- {
- var _loc1_ = this;
- startDrag(_loc1_,0,_loc1_._x,0,_loc1_._x,_loc1_._parent.bg._height - _loc1_._height);
- };
- scrollbar.slider.onRelease = scrollbar.slider.onReleaseOutside = function()
- {
- stopDrag();
- };
- content.onLoad = function()
- {
- a = content._height - scrollbar.bg._height;
- b = scrollbar.bg._height - scrollbar.slider._height;
- dist = a / b;
- startY = this._y;
- };
- content.onLoad();
- content.onEnterFrame = function()
- {
- if(scrollbar.slider._y < scrollbar.bg._y)
- {
- scrollbar.slider._y = scrollbar.bg._y;
- }
- else if(scrollbar.slider._y + scrollbar.slider._height > scrollbar.bg._y + scrollbar.bg._height)
- {
- scrollbar.slider._y = scrollbar.bg._y + scrollbar.bg._height - scrollbar.slider._height;
- }
- else
- {
- var _loc1_ = scrollbar.bg._height - (scrollbar.slider._height + scrollbar.slider._y);
- this._y = startY + (- (b - _loc1_) * dist);
- }
- };
- scrollbar.bg.onPress = function()
- {
- scrollbar.slider._y = this._ymouse;
- };
- var mov = 1 / (content._height / 19) * scrollbar.bg._height;
- scrollbar.up.onRelease = function()
- {
- scrollbar.slider._y -= mov;
- };
- scrollbar.down.onRelease = function()
- {
- scrollbar.slider._y += mov;
- };
- }
- else
- {
- scrollbar.slider._height = scrollbar.bg._height;
- scrollbar.slider._y = scrollbar.bg._y;
- }
- }
- function displayPage()
- {
- var _loc1_ = this;
- var page = _parent.searchMovieFunction;
- trace("page: " + page);
- _loc1_.onEnterFrame = function()
- {
- var _loc1_ = this;
- if(_loc1_._framesloaded >= _loc1_._totalframes)
- {
- if(page == "search")
- {
- gotoAndStop("search");
- play();
- }
- else
- {
- gotoAndStop("tables_homepage");
- play();
- }
- delete _loc1_.onEnterFrame;
- }
- };
- }
- displayPage();
-